//
//  UiButton+Extension.swift
//  weobo001
//
//  Created by mac on 10/16/15.
//  Copyright © 2015 mac. All rights reserved.
//

import UIKit

extension UIButton{
    convenience init(image: String, backgroundImage: String){
        self.init()
        setImage(UIImage(named: image), forState: UIControlState.Normal)
        setImage(UIImage(named: image + "_highligthed"), forState: UIControlState.Highlighted)
        setBackgroundImage(UIImage(named: backgroundImage), forState: UIControlState.Normal)
        setBackgroundImage(UIImage(named: backgroundImage + "_highlighted"), forState: UIControlState.Highlighted)
        sizeToFit()
    }
}
